package cn.yjh.server.protocol;

import java.nio.ByteBuffer;
import java.nio.channels.SocketChannel;

import cn.yjh.server.Decoder;
import cn.yjh.server.Encoder;
import cn.yjh.server.support.Request;
import cn.yjh.server.support.Response;

/**
 * @author yW0041229
 * @since 2022/1/5 10:33
 */
public abstract class ProtocolHandler implements Encoder, Decoder{

    protected final Request request;
    protected final Response response;


    protected ProtocolHandler(Request request, Response response) {
        this.request = request;
        this.response = response;
    }

    public abstract Request buildRequest();

    public abstract Response buildResponse();

}
